﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace MVlog.Core
{
    /// <summary>
    /// 文章
    /// </summary>
    [Table("Article")]
    public class Article : Entity<long>, IFullAudited
    {
        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// 发布时间
        /// </summary>
        public DateTime PublishedTime { get; set; }

        /// <summary>
        /// 发布标记 （true- 已发布；false- 未发布）
        /// </summary>
        public bool PublishRemark { get; set; }

        /// <summary>
        /// 标签 (用逗号分割，存tagid)
        /// </summary>
        public string TagIds { get; set; }

        //[ForeignKey(nameof(TagId))]
        //public List<Tag> Tags { get; set; }
        /// <summary>
        /// 评论数
        /// </summary>
        public int Commentnum { get; set; }
        
        /// <summary>
        ///浏览数 
        /// </summary>
        public int Viewnum { get; set; }

        /// <summary>
        /// 发布人Id
        /// </summary>
        public long? CreatorUserId { get; set; }

        public string CreatorUserName { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreationTime { get; set; }
        public long? LastModifierUserId { get; set; }
        /// <summary>
        /// 最后修改时间
        /// </summary>
        public DateTime? LastModificationTime { get; set; }
        public long? DeleterUserId { get; set; }
        public DateTime? DeletionTime { get; set; }
        public bool IsDeleted { get; set; }
    }
}
